package com.jyxd.web.data.dictionary;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 呼吸机盒子字典表
 */
@Entity
@Table(name = "dict_respirator_box")
@Data
public class RespiratorBoxDictonary implements Serializable {

    /**
     * 序列
     */
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Id
    @Column(name = "id", length = 32, nullable = false)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
    private String id;

    /**
     * 呼吸机id
     */
    @Column(name = "respirator_id")
    private String respiratorId;

    /**
     * 编号
     */
    @Column(name = "box_numbers")
    private String boxNumbers;

    /**
     * 编号
     */
    @Column(name = "box_ip")
    private String boxIp;

    /**
     * 编号
     */
    @Column(name = "box_port")
    private String boxPort;

    /**
     * 状态（0：禁用 1：正常 -1：删除）
     */
    @Column(name = "status")
    private int status;

    /**
     * 创建时间
     */
    @Column(name = "create_date")
    private Date createDate;

    /**
     * 关联科室编码
     */
    @Column(name = "office_code")
    private String officeCode;

    /**
     * 关联科室编码
     */
    @Column(name = "office_name")
    private String officeName;


    @Column(name = "tenant_id")
    private String tenantId;

    @Column(name = "procurement_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date procurementDate;
}
